<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title>yuan</title>
	</head>
	<body>
		<input type="text" placeholder="半径" id="a"/>
		<input type="text" placeholder="周长" id="b"/>
		<input type="text" placeholder="面积" id="c"/>
		<script>
			var p = Math.PI;
			var r = prompt("请输入圆的半径");
			var c = 2*r*p;
			var d = p*r*r;
			document.querySelector("#a").value = r;
			document.querySelector("#b").value = c;
			document.querySelector("#c").value = d;
		</script>
	</body>
</html>
